<template>
  <div>
    <van-nav-bar :title="active" fixed />
    <div class="main">
      <router-view></router-view>
    </div>

    <!-- 底部导航 -->
    <van-tabbar v-model="active">
      <van-tabbar-item replace to="/home" name="主页" icon="home-o"
        >主页</van-tabbar-item
      >
      <van-tabbar-item replace to="/comment" name="评论" icon="fire-o"
        >评论</van-tabbar-item
      >
      <van-tabbar-item replace to="/search" name="搜索" icon="search"
        >搜索</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: this.$route.meta.title,
    };
  },
};
</script>


<style scoped>
.main {
  padding: 1.227rem 0 1.333rem;
}
</style>